<?php

namespace app\admin\model;

use think\Model;

class UserFreezeHistory extends Model
{
    public function getOriginData()
    {
        return $this->origin;
    }

    public function getStatusList()
    {
        return ['1' => __('冻结'), '0' => __('解冻')];
    }

    public function getStatusTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
        $list = $this->getStatusList();
        return isset($list[$value]) ? $list[$value] : '';
    }

   
    public function user()
    {
        return $this->belongsTo('User', 'user_id')->setEagerlyType(0);
    }

}
